DEF_PROJECT=../../..
include $(DEF_PROJECT)/scripts/main.mk
name=readline
version=6.2
prefix=/usr
destdir=$(DIR_SYSROOT)
extdeps=eglibc-tools gcc-tools binutils-tools linux-header-tools

DL_SERV=http
DL_HOST=ftp.gnu.org
DL_PATH=gnu/$(name)
DL_SUFFIX=tar.gz

cflags+=--host=$(CC_TARGET)
cflags+=--build=$(CC_HOST)
cflags+=--libdir=/lib

post-build:
	$(MAKE) -C $(if $(build),$(build),$(source)) $(iflags)
	mv -f $(destdir)/lib/lib{readline,history}.a $(destdir)/usr/lib
	rm -f $(destdir)/lib/lib{readline,history}.so
	ln -sf ../../lib/libreadline.so.6 $(destdir)/usr/lib/libreadline.so
	ln -sf ../../lib/libhistory.so.6 $(destdir)/usr/lib/libhistory.so
